#pragma once
#include <string>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include "Board.h"
#include "Minimax.h"

/** \class IGame
	\brief Base class for games

	Your gameClass have to inherit this base class
	and implement all functions;
*/
class IGame
{
public:
	/**
	* Constructor
	*/
	IGame(){};
	
	/**
	* Destructor
	*/
	virtual ~IGame() {};

	/**
	* Starts the game,
	* Function supposed to initilize board and start GameState
	*/
	virtual void start() = 0;

	/**
	* Prints out all legal moves
	*/
	virtual void legal() {};

	/**
	* Moves Piece,
	* Only calls movePiece() function in state
	*/
	virtual void make(int fromX, int fromY, int toX, int toY) { };
	
	/**
	* Retract last move,
	* Only calls retract() function in state
	*/
	virtual void retract() { };

	/**
	* Prints out current gameState
	*/
	virtual void display() { };

	/**
	* Displays the evaluation of current gamestate
	*/
	virtual void evaluate() { };

	/**
	* The computer plays the next move
	* Displays the move it makes
	* if no more moves are available, it displays final score
	*/
	virtual void go(){ };

	/**
	* The difficulty level of go() function
	*/
	virtual void level(std::string level) { };
	
	/**
	*	Toggles debug mode on/off
	*	if debug is on, software should display additional information
	*	as it runs, otherwise only if asked for
	*/
	virtual void debug() { };

	/**
	* Returns string, with name of game
	*/
	virtual std::string getName() = 0;

protected:
	int m_level; ///< Current 
	Board m_board; ///< The Board
	Minimax m_minimax;	
};

